$(function(){
	//初始化表格 考勤数据
	
	tableSJ();
});

function tableSJ(){
	$('#YuanGongQinJiaTab').datagrid({
	    url:'YuanGongQinJia',
	    queryParams:{
	    	empid:$(".He_text_t").attr("id")
	    },
	    columns:[[
			{field:'LAEID',width:1,checkbox:true,title:'请假编号',align:'center'},
			{field:'EMPNAME',width:1,title:'员工姓名',align:'center'},
			{field:'DEPTNAME',width:1,title:'部门',align:'center'},
			{field:'CWASID',width:1,title:'所属考勤卡',align:'center'},
			{field:'TEMNAME',width:1,title:'班组名称',align:'center'},
			{field:'SHFNAME',width:1,title:'班次',align:'center'},
			{field:'SHFREM',width:1,title:'班次时间',align:'center'},
			{field:'TYPEZL',width:1,title:'请假原因',align:'center'},
			{field:'TYPEXZ',width:1,title:'请假类型',align:'center'},
			{field:'LAEMINTIME',fwidth:1,title:'请假开始时间',align:'center',
				formatter: function(value,row,index){
					return new Date(value).getFullYear() + '-' + (new Date(value).getMonth() + 1) + '-' + new Date(value).getDate() + ' ' + new Date(value).getHours() + ':' + new Date(value).getMinutes() + ':' + new Date(value).getSeconds();
				}
			},
			{field:'LAEMAXTIME',fwidth:1,title:'请假结束时间',align:'center',
				formatter: function(value,row,index){
					return new Date(value).getFullYear() + '-' + (new Date(value).getMonth() + 1) + '-' + new Date(value).getDate() + ' ' + new Date(value).getHours() + ':' + new Date(value).getMinutes() + ':' + new Date(value).getSeconds();
				}
			},
			{field:'LAETIME',width:1,title:'请假时长',align:'center'}
	    ]],
	    pagination:true,
	    pageNumber:1,
	    pageSize:5,
	    pageList:[5,10,15]
	});
}